<template>
  <el-table :data="banzi" highlight-current-row v-loading="banzilistLoading" style="width: 100%;">
    <el-table-column type="index" label="序号" width="70">
    </el-table-column>
    <el-table-column prop="Name" label="班子成员姓名" width="150">
    </el-table-column>
    <el-table-column prop="Zhiwu" label="职务" width="150">
    </el-table-column>
    <el-table-column prop="Shifouzhuyaofuzeren" label="是否主要负责人" width="150">
    </el-table-column>
    <el-table-column prop="Shifoudangyuan" label="是否中共党员" width="150">
    </el-table-column>
    <el-table-column prop="IDNumber" label="身份证号" width="200">
    </el-table-column>
    <el-table-column prop="Remark" label="备注">
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  props: {
    timestamp: ''
  },
  data () {
    return {
      banzi: [],
      banzilistLoading: false
    }
  },
  watch: {
    timestamp (val) {
      this.loaddata()
    }
    // $refs.tree2.getCurrentNode()
  },
  methods: {
    loaddata: function () {
      let _this = this
      _this.banzilistLoading = true
      let para = {
        id: this.$route.params.id
      }
      // var personParams = { Page: 0, Pagenum: 20, Personname: '', Unitkey: '', Sortkey: '', Isace: true, timestamp: new Date().getTime() }
      this.$http
        .post(`/shenghuohui/unitbanzi`, para)
        .then(function (response) {
          _this.banzilistLoading = false
          if (response.data.IsSuccess === true) {
            console.log('获取成功')
            _this.banzi = response.data.Result
          } else {
            console.log('获取数据失败:' + response.data.Msg)
            _this.$message({
              message: '获取数据失败:' + response.data.Msg,
              type: 'error'
            })
          }
        })
        .catch(function (error) {
          console.log(error)
          _this.$message({
            message: '网络获取失败:' + error,
            type: 'error'
          })
          _this.banzilistLoading = false
        })
    }
  }
}
</script>
<style scoped>
</style>
